package pluginUtils;

public class AGCircle extends Circle {
	

	


	@Override
	public int hashCode() {
		return super.hashCode()+(new Integer(this.color).hashCode())+(new Boolean(this.inverted).hashCode()); 
	}

	public void toggleInversion(){ 
		this.inverted=!this.inverted;
		this.curvature=-this.curvature;
		}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		AGCircle other = (AGCircle) obj;
		if (color != other.color)
			return false;
		if (inverted != other.inverted)
			return false;
		return true;
	}


	protected double curvature; 
	protected int color; 
	protected boolean inverted=false; 
	
	public AGCircle(Complexe center, double radius) {
		super(center,radius);
		this.curvature=1/radius; 
	}
	
	
	public AGCircle(Complexe center, double radius,boolean inverse) {
		this(center,radius);
		this.inverted=inverse; 
		if(inverse)
		 this.curvature=-1/radius;
	}
	
	public AGCircle(Complexe center, double radius,boolean inverse,int col) {
		this(center,radius);
		this.inverted=inverse; 
		if(inverse)
		 this.curvature=-1/radius; 
		this.color=col; 
	}

	public int getColor() {
		return color;
	}

		

	public boolean isInverted() {
		return inverted;
	}


	public void setColor(int color) {
		this.color = color;
	}


	public double getCurvature() {
		return curvature;
	}
	

}
